Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Fix set-pusher-suffix #13497

Merged
merged 3 commits into from
Mar 1, 2023
Merged

[No QA] Fix set-pusher-suffix #13497

merged 3 commits into from
Mar 1, 2023

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Dec 10, 2022

Details

Fixes set-pusher-suffix script

Fixed Issues

$ n/a

Tests

Set up NewDot dev to hit the staging API, then make sure Pusher works.

  1. Rename your .env file to .env.dev
  2. Rename .env.staging to .env
  3. npm run desktop
  4. Open .env and make sure a pusher dev suffix was not added
  5. Sign in with any account
  6. Go to Settings > Preferences and take a note of your priority mode
  7. Go to NewDot staging on web and sign in with the same account
  8. Go to Settings > Preferences, change your priority mode, and click save
  9. Go back to desktop and make sure that the priority mode updated properly

Shell tests
With a .env file

  1. Make sure your normal .env file is set up (copy from env.example if needed)
  2. Delete the pusher dev suffix in .env (if it exists)
  3. In the terminal in the App directory run scripts/set-pusher-suffix.sh
  4. Make sure the pusher dev suffix is added

image

Without one

  1. Rename your .env file to .env.dev so that you don't have a .env file
  2. In the terminal in the App directory run scripts/set-pusher-suffix.sh
  3. Verify that a .env file is created and the pusher suffix is added

image

  • Verify that no errors appear in the JS console

Offline tests

None

QA Steps

None

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Only the desktop platform is affected.

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop image image image
iOS
Android

@neil-marcellini
Copy link
Contributor

Hey @roryabraham it's been a while! Will you be able to complete this? I could take it over if you want.

@roryabraham roryabraham changed the title Fix set-pusher-suffix after linter [No QA] Fix set-pusher-suffix Mar 1, 2023
@roryabraham roryabraham marked this pull request as ready for review March 1, 2023 00:58
@roryabraham roryabraham requested a review from a team as a code owner March 1, 2023 00:58
@roryabraham
Copy link
Contributor Author

Sorry, forgot about this @neil-marcellini. Added tests and screenshots and this is ready for review

@melvin-bot melvin-bot bot requested review from amyevans and removed request for a team March 1, 2023 00:58
@MelvinBot
Copy link

@amyevans Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@amyevans
Copy link
Contributor

amyevans commented Mar 1, 2023

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop

Desktop - Before change:
Screenshot 2023-03-01 at 11 25 51 AM

After changing focus mode from staging web:
Screenshot 2023-03-01 at 11 26 59 AM

iOS
Android

@roryabraham roryabraham merged commit 06f75ab into main Mar 1, 2023
@roryabraham roryabraham deleted the Rory-FixPusherSuffix branch March 1, 2023 16:51
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
Open Search Page TTI 611.232 ms → 664.264 ms (+53.031 ms, +8.7%) 🔴
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 611.232 ms
Stdev: 22.090 ms (3.6%)
Runs: 578.1267090030015 579.1780200004578 579.9148360006511 582.5827639997005 582.7782789990306 586.9123950004578 591.1611739993095 594.4634199999273 594.6971840001643 597.7589110024273 597.8841149993241 601.5695799998939 602.1206060014665 602.8218999989331 604.0727140009403 606.2004389986396 612.0501710027456 614.5498050004244 614.8048509992659 616.4930019974709 618.0445560030639 618.9803070016205 621.3411859981716 624.0008550025523 624.6593419983983 624.8953460007906 625.9101160019636 626.8886319994926 633.3317060023546 640.4468590021133 647.681070998311 658.6708579994738 665.6796879991889

Current
Mean: 664.264 ms
Stdev: 18.447 ms (2.8%)
Runs: 617.3373610004783 621.3875329978764 638.2664390020072 644.6092130020261 647.8726809993386 650.4412439987063 652.0099690034986 653.2021079994738 654.0853269994259 654.4127609990537 658.2473959997296 660.7739670015872 661.6956390030682 661.9329430013895 663.2217609994113 663.6662999987602 664.6442880034447 665.2054859995842 666.4969489984214 667.7465009987354 669.0737720020115 669.7757569998503 670.1523840017617 670.968993999064 671.1580810025334 678.8569739982486 681.0179039984941 682.7306729964912 683.2261560000479 683.453572999686 694.2780360020697 697.9562989994884 700.7952070012689

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 697.420 ms → 725.611 ms (+28.191 ms, +4.0%)
App start runJsBundle 193.156 ms → 203.313 ms (+10.156 ms, +5.3%)
App start regularAppStart 0.014 ms → 0.014 ms (+0.001 ms, +3.8%)
App start nativeLaunch 19.871 ms → 19.143 ms (-0.728 ms, -3.7%)
Show details
Name Duration
App start TTI Baseline
Mean: 697.420 ms
Stdev: 32.529 ms (4.7%)
Runs: 638.5848900005221 654.1605020016432 658.3629419989884 658.4760369993746 663.1260900013149 664.6728649996221 666.2892780005932 671.9378210008144 671.9395320005715 677.8379000015557 678.1946440003812 678.6144049987197 679.364482998848 680.0409759990871 687.1517679989338 699.1538630016148 705.6620059981942 708.3783469982445 709.7805639989674 710.0887980014086 711.9060229994357 715.5836890004575 716.1061789989471 716.6002810001373 722.2610020004213 725.4815599992871 727.589159000665 741.5605870001018 750.0502809993923 764.751276999712 766.2972440011799

Current
Mean: 725.611 ms
Stdev: 38.692 ms (5.3%)
Runs: 655.4396379999816 666.2967259995639 684.6040700003505 685.0219330005348 685.9923579990864 686.3928779996932 689.3563469983637 690.0219010002911 691.5936710014939 691.6012579984963 701.5284299999475 713.2123319990933 716.4597410000861 717.1623300015926 721.8951410017908 725.9956209994853 727.2965879999101 727.5688650012016 728.3448220007122 732.869729001075 736.6321140006185 738.8083150014281 738.9801380001009 746.284729000181 752.9655250012875 758.1833459995687 761.5626129992306 767.9997199997306 774.1442730017006 778.6649699993432 793.301658000797 833.3587840013206
App start runJsBundle Baseline
Mean: 193.156 ms
Stdev: 22.514 ms (11.7%)
Runs: 157 168 169 169 170 172 172 173 174 176 181 181 182 183 188 188 189 193 193 194 197 202 205 207 207 212 213 224 224 228 236 254

Current
Mean: 203.313 ms
Stdev: 25.058 ms (12.3%)
Runs: 167 170 174 177 177 180 180 182 183 184 185 186 188 194 195 197 201 201 203 204 207 214 221 222 224 227 232 238 239 249 250 255
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (4.3%)
Runs: 0.012247998267412186 0.01245100051164627 0.01269499957561493 0.012776996940374374 0.012817997485399246 0.013062000274658203 0.013101998716592789 0.013183001428842545 0.013224001973867416 0.013305999338626862 0.013468001037836075 0.013468001037836075 0.013468999415636063 0.013549000024795532 0.013590000569820404 0.013590000569820404 0.013631001114845276 0.01367199793457985 0.013753000646829605 0.013753999024629593 0.013875000178813934 0.013875000178813934 0.013916000723838806 0.013916000723838806 0.013916000723838806 0.013996999710798264 0.014037996530532837 0.01411999762058258 0.014242000877857208 0.014362998306751251 0.014688998460769653 0.014730002731084824

Current
Mean: 0.014 ms
Stdev: 0.001 ms (6.0%)
Runs: 0.012816999107599258 0.012858003377914429 0.012980002909898758 0.013020999729633331 0.013143002986907959 0.01326499879360199 0.013305999338626862 0.013387002050876617 0.013388000428676605 0.01342799887061119 0.013508997857570648 0.01354999840259552 0.013670999556779861 0.013833999633789062 0.013916000723838806 0.014078997075557709 0.014118999242782593 0.014159999787807465 0.014240998774766922 0.014322999864816666 0.014322999864816666 0.01436300203204155 0.01452699676156044 0.014566998928785324 0.01476999744772911 0.015014998614788055 0.01505500078201294 0.015095997601747513 0.015421997755765915 0.015625 0.015625 0.015707001090049744
App start nativeLaunch Baseline
Mean: 19.871 ms
Stdev: 2.296 ms (11.6%)
Runs: 17 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 20 20 20 21 21 21 22 22 22 23 24 24 27

Current
Mean: 19.143 ms
Stdev: 0.915 ms (4.8%)
Runs: 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 21 21

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Mar 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker.

@OSBotify
Copy link
Contributor

OSBotify commented Mar 1, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

🚀 Deployed to staging by https://github.com/roryabraham in version: 1.2.78-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Mar 6, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.78-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants